<?php
/* *
 * 功能：支付宝支付宝手机网页支付调试入口页面
 * 版本：3.3
 * 日期：2012-07-23
 * 说明：
 * 以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 */


$request = count($_POST) == 0 ? $_GET : $_POST;


$user_ip = $_SERVER["REMOTE_ADDR"];
$player_uid = $request["player_uid"];
$rmb = $request["rmb"];
$server_id = $request["server_id"];
$account = $request["account"];
$charge_type = $request["charge_type"];
$subChannel = $request["subChannel"];
$isBind=$request["isBind"];
$channel = $_POST["channel"];
if($subChannel==''){
    $subChannel=0;
}
if($channel==''){
	$channel=0;
}

if(!is_numeric($rmb) || (int)$rmb <= 0 || !is_numeric($server_id)
    || strlen($account) <= 3
    || !is_numeric($charge_type) || (int)$charge_type < 1 || (int)$charge_type > 2) {
    header("Content-type: text/plain; charset=utf-8");
    print_r('参数错误');
    return;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>支付宝手机网页支付</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content = "width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0" />
    <style type="text/css">
        /* normalize.css */
        html, body, div, span, applet, object, iframe,
        h1, h2, h3, h4, h5, h6, p, blockquote, pre,
        a, abbr, acronym, address, big, cite, code,
        del, dfn, em, font, img, ins, kbd, q, s, samp,
        small, strike, strong, sub, sup, tt, var,
        dl, dt, dd, ol, ul, li,
        fieldset, form, label, legend,
        table, caption, tbody, tfoot, thead, tr, th, td {
            margin: 0;
            padding: 0;
            border: 0;
            outline: 0;
            font-weight: inherit;
            font-style: inherit;
            font-size: 100%;
            font-family: inherit;
            vertical-align: baseline;
        }

        html,body{
            width: 100%;
            height: 100%;
        }

        body{
            font-family: "微软雅黑";
            min-width: 320px;
            position: relative;
            font-size: 16px;
            background:#ffffff;
        }
        ul,ol{
            list-style:none;
        }
        .title{
            color: #ADADAD;
            font-size: 14px;
            font-weight: bold;
            padding: 8px 16px 5px 10px;
        }
        .hidden{
            display:none;
        }
        .new-btn-login{
            display: block;
            width: 84px;
            height: 32px;
            background: #ff8900;
            border: medium none;
            color: white;
            border-radius: 2px;
            font-weight: bold;
            margin: 10px auto;
            -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
        }
        .touch-hover{
            background: #ffa300;
        }
        .bank-list{
            overflow:hidden;
            margin-top:5px;
        }
        .bank-list li{
            float:left;
            width:153px;
            margin-bottom:5px;
        }

        #main{
            padding-top: 20%;
        }
        .cashier-nav,.order{
            margin: 0 2%;
        }
        .order p{
            margin: 10px 0;
        }
        #foot{
            margin-top:10px;
            color: #999999;
            font-size: 12px;
            line-height: 130%;
            text-align:center;
        }
        .cashier-nav {
            font-size: 14px;
            text-align: left;
            height:30px;
            border-bottom:solid 2px #CFD2D7;
        }
        .cashier-nav ol li {
            float: left;
        }
        .cashier-nav li.current {
            color: #AB4400;
            font-weight: bold;
        }
        .cashier-nav li.last {
            clear:right;
        }
    </style>
</head>
<body>
<div id="main">
    <div class="cashier-nav">
        <ol>
            <li class="current">1、确认信息 →</li>
            <li>2、点击确认 →</li>
            <li class="last">3、确认完成</li>
        </ol>
    </div>
    <div class="order">
        <p>订单名称：北京齿轮科技有限公司游戏充值</p>
        <p>付款金额：<span> <?php echo $rmb;?> </span>元</p>
        <form name=alipayment action=alipayapi.php method=post target="_blank">
            <input type=hidden name="player_uid" value="<?php echo $player_uid;?>">
            <input type=hidden name="server_id" value="<?php echo $server_id;?>">
            <input type=hidden name="account" value="<?php echo $account;?>">
            <input type=hidden name="rmb" value="<?php echo $rmb;?>">
			<input type=hidden name="subChannel" value="<?php echo $subChannel;?>">
			<input type=hidden name="isBind" value="<?php echo $isBind;?>">
			<input type=hidden name="channel" value="<?php echo $channel;?>">
            <input type=hidden name="charge_type" value="<?php echo $charge_type;?>">
            <button class="new-btn-login" id="btn" type="submit">确 认</button>
        </form>
    </div>
    <div id="foot">
        <ul class="foot-ul">
            <li>如果您点击“确认”按钮，即表示您同意该次的执行操作。</li>
            <li>支付宝版权所有 2011-2015 ALIPAY.COM</li>
        </ul>
    </div>
</div>
<script>
//    function touchStart(){
//        $("#phone-btn").addClass("touch-hover");
//    }
//    function touchEnd(){
//        $("#phone-btn").removeClass("touch-hover");
//    }
//    var btn = document.getElementById("btn");
//    btn.addEventListener("touchstart",touchStart,false);
//    document.addEventListener("touchend",touchEnd,false);
</script>
</body>
</html>